<% if @attachments.empty? %>
  <%= render_message do %>
    <% if search_filter_params[:q].present? %>
      <%= Alchemy.t(:no_search_results) %>
    <% else %>
      <%= Alchemy.t(:no_files_in_archive) %>
    <% end %>
  <% end %>
<% else %>
  <ul class="list">
    <li class="list-header">
      <span class="list-primary">
        <%= Alchemy::Attachment.human_attribute_name('name') %>
      </span>
      <span class="list-secondary">
        <%= Alchemy::Attachment.human_attribute_name('file_mime_type') %>
      </span>
    </li>
    <%= render partial: 'file_to_assign', collection: @attachments %>
  </ul>
  <%= render "alchemy/admin/resources/pagination", resources: @attachments, hide_per_page_select: true %>
<% end %>
